/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aal.entitybean;

import java.io.Serializable;
import java.security.Timestamp;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import org.eclipse.persistence.annotations.Direction;
import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;
import org.eclipse.persistence.annotations.StoredProcedureParameter;
import org.eclipse.persistence.annotations.NamedStoredProcedureQueries;

/**
 *
 * @author thaoct1990_2pro
 */
@Entity
@NamedStoredProcedureQueries({

    @NamedStoredProcedureQuery(name = "sp_findProductsByCategoryID",
    procedureName = "findProductsByCategoryID",
    returnsResultSet = true,
    resultClass = Products.class,
    parameters = {
        @StoredProcedureParameter(queryParameter = "categoryID", name = "categoryID", direction = Direction.IN, type = String.class),
        @StoredProcedureParameter(queryParameter = "pageSize", name = "pageSize", direction = Direction.IN, type = Integer.class),
        @StoredProcedureParameter(queryParameter = "currentPage", name = "currentPage", direction = Direction.IN, type = Integer.class),
        @StoredProcedureParameter(queryParameter = "itemCount", name = "itemCount", direction = Direction.OUT, type = Integer.class)
    }),

    @NamedStoredProcedureQuery(name = "sp_findProductsByCategoryID1",
    procedureName = "findProductsByCategoryID1",
    returnsResultSet = true,
    resultClass = Products.class,
    parameters = {
        @StoredProcedureParameter(queryParameter = "categoryID", name = "categoryID", direction = Direction.IN, type = String.class)
    })
})
        
public class MyNamedQuery implements Serializable {

    @Id
    private Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
}
